﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RATSharp.Validator
{
    /// <summary>
    /// This is the basic interface for parsing input from console.  
    /// </summary>
    /// <typeparam name="T">Target type against validation is running.</typeparam>
    public interface IInputValidator<T>
    {
        /// <summary>
        /// Validates input parameter
        /// </summary>
        /// <param name="input">Input parameter</param>
        /// <param name="output">Validated and parsed parameter. Null in case parsing was not successful. </param>
        /// <returns>true if validation was successfully completed. false otherwise.</returns>
        bool validate(string input, out T output);
    }
}
